<template>
	<view class="u-demo">
		<view class="u-demo-title">
			{{laji.name}}
		</view>
		<image :src="base+laji.imgUrl" style="width: 100%;"></image>
		<uni-group title="分类描述">
			<view>{{laji.introduce}}</view>
		</uni-group>
		<uni-group title="举例">
			<uni-grid :column="4">
				<uni-grid-item v-for="(item,index) in fen">
					<image style="width: 100%;" :src="base+item.imgUrl"></image>
					<view>{{item.name}}</view>
				</uni-grid-item>
			</uni-grid>
		</uni-group>
		<uni-group title="投放指南">
			<view class="">
				{{laji.guide}}
			</view>
		</uni-group>
	</view>
</template>

<script>
	import api from 'commer/apiURL.js'
	export default {
		data() {
			return {
				base:api.baseurl,
				laji:'',
				fen:[]
			}
		},
		onLoad() {
			this.laji = uni.getStorageSync('laji')[0]
			console.log(this.laji)
			this.getlun()
		},
		methods: {
			getlun(){
				let la = uni.getStorageSync('laji')[0]
				console.log(la.id)
				this.$get(this.base+'/prod-api/api/garbage-classification/garbage-example/list',{
					type:la.id
				}).then((res)=>{
					this.fen = res.rows
					console.log(res)
				})
			}
		}
	}
</script>

<style>

</style>
